<?php

	function tarTest()
	{
		if(defined('SAAS_MODE')&&SAAS_MODE){
			exit;
		}
		$dir = HOME_DIR.'/backup';
		include('tar.class.php');
		$tar = new Tar();
		chdir($dir);
		$tar->addFile('multibak_20081117171948_1.sql');
		$tar->addFile('multibak_20081117171948_2.sql');
		$tar->addFile('multibak_20081117171948_4.sql');
		$tar->addFile('multibak_20081117171948_5.sql');
		$tar->addFile('multibak_20081117171948_6.sql');

		$verInfo = $this->system->version();
		$backupdata['app'] = $verInfo['app'];
		$backupdata['rev'] = $verInfo['rev'];
		$backupdata['vols'] = $fileid;
		$xml = $this->system->loadModel('utility/xml');
		$xmldata = $xml->array2xml($backupdata,'backup');
		file_put_contents('archive.xml',$xmldata);
		$tar->addFile('archive.xml');
		$tar->filename = 'multibak_aaaa.tgz';
		$tar->saveTar();
		echo 'ok';
		/*
		for($i=1;$i<=$fileid;$i++){
			@unlink('multibak_'.$filename.'_'.$i.'.sql');
		}
		*/
	   // @unlink('archive.xml');

	}
?>